import _ from "lodash"

/**
 * 获取Electron.remote
 * @returns
 */
export const getRemote = () => {
	try {
		return require("@electron/remote")
	} catch (error) {}
	return null
}

/**
 * 是否是ElectronApp环境
 * @returns
 */
export const isElectronApp = () => _.isPlainObject(getRemote())
